package com.yunhe.java.day10;

/**
 * Created by Administrator on 2017/8/3 0003.
 */
public class Sanj {
    int x;
    int y;
    int z;
    public void Sanj(int a, int b, int c) throws NotSanJException {
        this.x=a;
        this.y=b;
        this.z=c;
        if (x > y - z && x < y + z) {
            System.out.println("可以组成三角形");
        } else {
            throw new NotSanJException("非法");
        }
    }
    public void getArea(){

       int s= x*y*z;
        System.out.println(s);
    }
    public  void show(){

        System.out.println(x+" "+y+" "+z);
    }

}
